package com.usian.admin.feign;

import com.usian.model.admin.dtos.NewsAuthDto;
import com.usian.model.common.dtos.PageResponseResult;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.media.pojos.WmNews;
import com.usian.model.media.pojos.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "leadnews-wemedia")
public interface WemediaFeign {

    @GetMapping("/api/v1/news/findOne/{id}")
    public WmNews findByNewsId(@PathVariable Integer id);

    @PostMapping("/api/v1/news/update")
    public ResponseResult updateNewsStatus(@RequestBody WmNews wmNews);

    @GetMapping("/wemedia/findById/{id}")
    public WmUser findById(@PathVariable Integer id);

    @GetMapping("/api/v1/news/findNewsListShenhe")
    public List<Integer> findNewsListShenhe();

    @PostMapping("/api/v1/news/authList")
    public PageResponseResult findNewsRenGongPage(@RequestBody NewsAuthDto dto);

    @GetMapping("/api/v1/news/findNewsOne/{id}")
    public ResponseResult findOne(@PathVariable Integer id);

    @RequestMapping("/api/v1/news/authNewsRenGong")
    public ResponseResult authNewsRenGong(@RequestBody NewsAuthDto dto);
}
